<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="__ADMIN__/css/font.css">
<link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
<script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
<script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
{include file="public/layui" /}

</head>
<body>
<div class="x-body">
	<form class="layui-form">
		<input type="hidden" name="id" value="{$data.id}">
		<div class="layui-form-item">
			<label for="name" class="layui-form-label">
				<span class="x-red">*</span>所属岗位
			</label>
			<div class="layui-input-inline">
                <select name="job_id" lay-search required>
                <option value="">请选择</option>
                {volist name="jobList" id="val"}
                <option value="{$val.id}" {if $data['job_id'] == $val['id']} selected {/if} >{$val.name}</option>
                {/volist}
                </select>
			</div>
			<div class="layui-form-mid layui-word-aux">
				<span class="x-red">*</span>
			</div>
		</div>
		<div class="layui-form-item">
			<label for="item_name" class="layui-form-label">
				<span class="x-red">*</span>考核项目
			</label>
			<div class="layui-input-inline">
				<input type="text" id="item_name" name="item_name" value="{$data.item_name}" required=""  autocomplete="off" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">
				<span class="x-red">*</span>
			</div>
		</div>
		<div class="layui-form-item">
			<label for="type_name" class="layui-form-label">
			    维度
			</label>
			<div class="layui-input-inline">
				<input type="text" id="type_name" name="type_name" value="{$data.type_name}" required=""  autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label for="max_score" class="layui-form-label">
				<span class="x-red">*</span>项目满分
			</label>
			<div class="layui-input-inline">
				<input type="text" id="max_score" name="max_score" value="{$data.max_score}" required=""  autocomplete="off" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">
				<span class="x-red">*</span>
			</div>
		</div>
		<div class="layui-form-item">
			<label for="index_desc" class="layui-form-label">
				<span class="x-red">*</span>指标要求
			</label>
			<div class="layui-input-inline">
				<input type="text" id="index_desc" name="index_desc" value="{$data.index_desc}" required=""  autocomplete="off" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">
				<span class="x-red">*</span>
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label for="rule_desc" class="layui-form-label">
				<span class="x-red">*</span>评分规则
			</label>
			<div class="layui-input-block">
			    <textarea placeholder="请输入内容" name="rule_desc" class="layui-textarea">{$data.rule_desc}</textarea>
			</div>
		</div>
		{if $data['id']}
		<div class="layui-form-item">
			<label class="layui-form-label">
				<span class="x-red">*</span>状态
			</label>
			<div class="layui-input-block">
				<input type="radio" name="status" {if condition="$data['status'] eq 1" }checked="checked" {/if} value="1" lay-skin="primary" title="启用" checked="">
				<input type="radio" name="status" {if condition="$data['status'] eq 0" }checked="checked" {/if} value="0" lay-skin="primary" title="禁用">
			</div>
		</div>
		{/if}
		<div class="layui-form-item">
			<label for="L_repass" class="layui-form-label">
			</label>
			<button class="layui-btn" lay-filter="edit" lay-submit="">
				确定
			</button>
		</div>
	</form>
</div>
<script>
layui.use(['form','layer','transfer','util','jquery','laydate','upload'], function(){
  $ = layui.jquery;
  var form = layui.form
  ,layer = layui.layer
  ,transfer = layui.transfer
  ,util = layui.util
  ,laydate = layui.laydate
  ,upload = layui.upload;
  
    form.on('submit(edit)', function(data){
        $.ajax({
            type:'POST',
            dataType:'json',
            data:data.field,
            url:"",
            success:function(obj){
              layer.alert(obj.msg, {icon: obj.icon},function () {
                // 获得frame索引
                var index = parent.layer.getFrameIndex(window.name);
                //关闭当前frame
                parent.layer.close(index);
                // 可以对父窗口进行刷新 
                x_admin_father_reload();
              });
            }
        });
        return false;
    });
});
</script>
</body>

</html>